package com.gopay.common.constants.bt;

import java.util.HashMap;
import java.util.Map;
/**
 * 结算状态枚举
 * @BtBizSettlementStatusEnum.java
 * @author mz
 * @2013-7-30 上午11:16:04  www.gopay.com.cn Inc.All rights reserved.
 */
public enum BtSettlementStatusEnum {
    /**
     * 待结算
     */
    STANDBY("30001"),
    /**
     * 已结算
     */
    SETTLED("20000"),
    /**
     * 处理中
     */
    PROCESSING("30000"),
    /**
     * 审核拒绝
     */
    REFUSE("20003"),
    /**
     * 取消
     */
    CANCEL("20001");
    
    private final String value;

    private static final Map<String,BtSettlementStatusEnum> stringToEnum = new HashMap<String, BtSettlementStatusEnum>();
    
    static{
        for(BtSettlementStatusEnum e : values()){
            stringToEnum.put(e.name(), e);
        }
    }

    BtSettlementStatusEnum(String value) {
        this.value = value;
    }

    public String getStatus() {
        return value;
    }
    
    @Override
    public String toString(){
        return value;
    }

    public static BtSettlementStatusEnum  fromString(String target){
        return stringToEnum.get(target);
    }

}
